<?php

class ConnectionFactory {

    private $dbType = 'mysql';
    private $host = 'localhost';
    private $user = 'root';
    private $pass = '';
    private $dbName = 'ImageProcess';

    public function getConnection() {
        $conn = null;
        try {
            $conn = new PDO(
                    $this->dbType . ':host=' . $this->host . ';dbname=' . $this->dbName, $this->user, $this->pass
            );
            //echo'conectou'; 
        } catch (PDOException $e) {
            echo 'DB Error: ' . $e->getMessage();
        }
        return $conn;
    }

}

?>